var box = document.getElementById('box');
//var btn = document.getElementById('btn');
//var zoom = document.getElementById('zoom');
var timer = null; 
window.onload = function(){
 	var car2 = document.createElement('img');
	car2.id = 'car2';
	box.appendChild(car2);
	car2.src = 'img/car2.png';	
$("#car2").fadeIn(2000);
var zoom = document.createElement('img');
zoom.id = 'zoom';
box.appendChild(zoom);
zoom.src = 'img/seal.png';

var zoomWidth = zoom.offsetWidth;
var zoomHeight = zoom.offsetHeight;
timer = setInterval(function(){
	zoomWidth -=10;
	zoomHeight -=10;
	
	zoom.style.width = zoomWidth + 'px';
	zoom.style.height = zoomHeight + 'px';
	
var Cleartimer = setInterval(function(){
   	  clearInterval(timer);
   	  timer = null;
// 	  clearInterval(Cleartimer);
   },850)
	
},20)
   var btn = document.createElement('img');
   btn.id = 'btn';
   box.appendChild(btn);
   btn.src = 'img/开关.png';
btn.onclick = function(){
	window.open('https://www.baidu.com','_self');
}

}